<!DOCTYPE html>
<html>
	<head>
		<title>业务受理</title>
		<meta http-equiv="Pragma" CONTENT="no-cache">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="renderer" content="webkit">
		<!-- <link href="${cxt !}/ddc/css/lsdj.css" rel="stylesheet" type="text/css" /> -->
		<%include("/common/include.html"){}%>

		<style type="text/css">
			#customInfo li{
				display: inline-block;
				width: 165px;
				height: 30px;
				position: relative;
				margin-top: 5px;
			}
			#customInfo li div{
				position: absolute;
				right: 0px;
			}
			input {
				border: 1px solid black;
			}
			
			.table td {
				padding: 5px;
			}
			.name{
			
			background: #bad0ff;
			}
			 .high{ color: red; }
		</style>

	</head>
	<body  style="overflow: hidden;">
		<object classid="clsid:D7366439-E978-4C7F-A5AE-011D2E65CB74" codebase="SFZ2Reader.CAB" id="fingermark" style="height: 10px;">
        	<span style="color:red" >ActiveX 控件装入失败!-- 请检查浏览器的安全设置。</span>
		</object>
		<div class="easyui-layout" style="width:100%;height:100%;">
		<form id="info_form" method="post">
			
			<div data-options="region:'center'"  style="OVERFLOW-X:hidden;">
				<div class="easyui-layout" style="width:100%;">
				<table class="table" width="100%"  border="1">
					<tr>
						<td style="text-align: right;" class="name">业务流水号</td>
						<td><input name="business.LSH" style="width:90%;" value="${LSH!}" readonly unselectable='on' onfocus='this.blur()'/></td>
					</tr>
					<tr>
						<td colspan="8">
							<div style="margin-left:5px;font-weight: bold;font-size:18px;">车辆所有人信息&nbsp;&nbsp;&nbsp;</div>
						</td>
					</tr>
					<tr>
						<td width="10%" style="text-align: right;" class="name">所有人性质</td>
						<td width="15%">
							<select id="OWNERTYPE" name="owner.OWNERTYPE" style="width:90%;">
								<option value="个人">个人</option>
								<option value="企业">企业</option>
							</select>
						</td>
						<td width="10%" style="text-align: right;" class="name">所有人名称</td>
						<td width="15%"><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" class="required" id="OWNERNAME" name="owner.OWNERNAME" style="width:90%;"/><strong class='high'>*</strong></td>
						<td width="10%" style="text-align: right;" class="name" id="td_dqsfxx" >读取身份信息</td>
						<td width="15%" id="td_dqsfxx2"><input type="button" name="regfinger" id="regfinger" onclick="submitRegister();"style="width:90%;" value="读取" /></td>
						
						<td width="10%" style="text-align: right;" class="name" id = "td_sfzmhm">身份证号码</td>
						<td width="15%"><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" id="SFZHM" name="owner.SFZHM" style="width:90%;"/><div id="checkExistID" style="color: red;" ></div></td>
						
						<!-- <td width="10%" style="text-align: right;" class="name">企业名称</td>
						<td width="15%"><input name="owner.COMPANYNAME" style="width:90%;"/></td> -->
						<!-- <td width="10%" style="text-align: right;" class="name">社会信用代码</td>
						<td width="15%"><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" name="owner.SFZHM" style="width:90%;"/></td>
					 -->
					</tr>
					
					<tr>
						<td style="text-align: right;" class="name">是否老年</td>
						<td width="15%">
							<select id="SFLN" name="owner.SFLN" style="width:90%;">
								<option value="否">否</option>
								<option value="是">是</option>
							</select>
						</td>
						<td width="10%" style="text-align: right;" class="name">老年证编号</td>
						<td width="15%"><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" name="owner.LNNUM" style="width:90%;"/></td>
						<td style="text-align: right;" class="name">是否残疾</td>
						<td width="15%">
							<select id="SFCJ" name="owner.SFCJ" style="width:90%;">
								<option value="否">否</option>
								<option value="是">是</option>
							</select>
						</td>
						<td width="10%" style="text-align: right;" class="name">残疾证编号</td>
						<td width="15%"><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" name="owner.CJNUM" style="width:90%;"/></td>
					</tr>
					
					<tr>
						<td style="text-align: right;" class="name">行政区划</td>
						<td width="15%">
							<select id="ADDRESS" style="width:90%;" name="owner.ADDRESS">
								<option value="平城区">平城区</option>
								<option value="云冈区">云冈区</option>
								<option value="新荣区">新荣区</option>
								<option value="云州区">云州区</option>
								<option value="左云县">左云县</option>
								<option value="阳高县">阳高县</option>
								<option value="浑源县">浑源县</option>
								<option value="天镇县">天镇县</option>
								<option value="广灵县">广灵县</option>
								<option value="灵丘县">灵丘县</option>
							</select>
						</td>
						<td style="text-align: right;" class="name">详细地址</td>
						<td width="15%"><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" name="owner.DETAILADDRESS" style="width:90%;"/></td>
						<td style="text-align: right;" class="name">座机</td>
						<td width="15%"><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" id="tel" onblur="checkTel()" name="owner.TEL" style="width:90%;" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onblur="this.v();"/><div id="telt" style="color: red;" ></div></td>
						<td style="text-align: right;" class="name">手机</td>
						<td width="15%">
						<input  onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" id="uid" onblur="checkPhone()" name="owner.PHONE" style="width:90%;"  onkeyup="value=value.replace(/[^\d]/g,'')"/><div id="uidt" style="color: red;" ></div>
						</td>
					</tr>
					
					<tr>
						<td colspan="8">
							<div style="margin-left:5px;font-weight: bold;font-size:18px;">车辆参数信息</div>
						</td>
					</tr>
					<tr>
						<td style="text-align: right;" class="name">车辆类型</td>
						<td width="15%">
							<select id="CLLX" name="vehicleparemeters.CLLX" style="width:90%;">
								<option value="电动车自行车">电动自行车</option>
								<option value="电动二轮车">电动二轮车</option>
								<option value="电动轮椅车">电动轮椅车</option>
								<option value="电动三轮车">电动三轮车</option>
							</select>
						</td>
					</tr>
					<tr>
						<td style="text-align: right" class="name">车辆识别代号</td>
						<td><input  onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" class="required" name="vehicleparemeters.CLSBDH" style="width:90%;"/><strong class='high'>*</strong></td>
						<td style="text-align: right;" class="name">使用性质</td>
						<td width="15%">
							<select id="SYXZ" name="vehicleparemeters.SYXZ" style="width:90%;">
								<option value="家庭自用">家庭自用</option>
								<option value="企业使用">企业使用</option>
							</select>
						</td>
						<td style="text-align: right;" class="name">车辆品牌</td>
						<td><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" name="vehicleparemeters.CLPP" id=""  style="width:90%;"/></td>
						<!-- <td style="width: 15%">
							<select style="width:90%;border-color: black;" style="width:90%;" name="vehicleparemeters.CLPP" id="CLPP1" value="${vehicleparemeters.CLPP !}">
								<optgroup label="电动自行车">
									<option>绿源</option>
									<option>新日</option>
									<option>捷安特</option>
									<option>雅迪</option>
									<option>阿米尼</option>
									<option>洪都</option>
									<option>雅马哈</option>
									<option>爱玛</option>
									<option>小鸟</option>
									<option>邦德.富士达</option>
								</optgroup>
								<optgroup label="电动轮椅">
									<option>互邦Hubang</option>
									<option>鱼跃yuwell</option>
									<option>凯洋KAIYANG</option>
									<option>FOSHAN佛山轮椅</option>
									<option>MiKi三贵</option>
									<option>ottobock奥托博克</option>
									<option>INVACARE英维康</option>
									<option>Karma康扬</option>
									<option>VERMEIREN卫美恒</option>
									<option>松永MATSUNAGA</option>
								</optgroup>
								<optgroup label="低速">
									<option>唐骏王子</option>
									<option>富路喜瑞</option>
									<option>道爵开拓者</option>
									<option>雷丁d70</option>
									<option>时风到d306</option>
									<option>力帆320e</option>
									<option>宏瑞h3</option>
									<option>御捷祥和</option>
									<option>丽驰b01</option>
									<option>宝压童年</option>
								</optgroup>
								<optgroup label="三轮车">
									<option>金彭</option>
									<option>宗申车辆</option>
									<option>淮海车辆</option>
									<option>福田五星</option>
									<option>隆鑫</option>
									<option>万虎</option>
									<option>百事利电动车</option>
									<option>新鸽</option>
									<option>宝岛</option>
									<option>比德文</option>
								</optgroup>
								<optgroup label="其他">
									<option>其他</option>
								</optgroup>
							</select>
						</td> -->
						<td style="width: 10%;text-align: right" class="name">车辆型号</td>
						<td><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" name="vehicleparemeters.CLXH" id=""  style="width:90%;"/></td>
						<!-- <td style="width: 15%">
							<input class="easyui-combobox" style="border-color: black;height: 20px;width:90%;" id="CLXH" 
								name="vehicleparemeters.CLXH" data-options="url:'${cxt!}/hpfp/getclxx',method:'post',valueField:'model',textField:'model'" value="${vehicleparemeters.CLXH !}">
						</td> -->
					</tr>
					
					<tr>
						<td style="text-align: right" class="name">生产厂家</td>
						<td><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" name="vehicleparemeters.SCCJ" id="ZZCMC"  style="width:90%;" value="${vehicleparemeters.SCCJ !}"/></td>
						<td style="text-align: right;" class="name">出厂日期</td>
						<td><input editable="false" onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" id="CCRQ" name="vehicleparemeters.CCRQ" id="ccrq" class="easyui-datebox inputBox theme-textbox-radius 
							date" style="border: 1px solid black; width:90%; height: 20px;"/>
						</td>
						<td style="text-align: right;" class="name">合格证编号</td>
						<td><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" id="HDZZL" name="vehicleparemeters.HGZBH" style="width:85%;"></td>
						<td style="text-align: right;" class="name">使用年限/年</td>
						<td><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" name="vehicleparemeters.SYNX" id="synx" style="width:90%;" value="${vehicleparemeters.SYNX !}" type="text"  onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"/></td>
					</tr>
					
					<tr>
						<td style="text-align: right;" class="name">车身颜色</td>
						<td>
							<select id="CSYS" style="width:90%;border-color: black;" name="vehicleparemeters.CSYS">
								<option value="红色">红色</option>
								<option value="白色">白色</option>
								<option value="黑色">黑色</option>
								<option value="粉色">粉色</option>
								<option value="绿色">绿色</option>
								<option value="蓝色">蓝色</option>
								<option value="橙色">橙色</option>
								<option value="紫色">紫色</option>
								<option value="黄色">黄色</option>
								<option value="棕色">棕色</option>
								<option value="其他">其他</option>
							</select>
						</td>
						<td style="text-align: right;" class="name">前后轮距/CM</td>
						<td><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" name="vehicleparemeters.QHLJ" id="synx" style="width:90%;" value="${vehicleparemeters.QHLJ !}" type="text"  onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"/></td>
						<td style="text-align: right;" class="name">车体宽度/CM</td>
						<td><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" name="vehicleparemeters.CTKD" id="synx" style="width:90%;" value="${vehicleparemeters.CTKD !}" type="text"   onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"/></td>
						<td style="text-align: right;" class="name">整车质量/Kg</td>
						<td><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" name="vehicleparemeters.ZCZL" id="synx" style="width:90%;" value="${vehicleparemeters.ZCZL !}" type="text"  onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"/></td>
					</tr>
					
					<tr>
						<td style="text-align: right;" class="name">核定载人数</td>
						<td><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" id="ZZL" name="vehicleparemeters.HDZRS" style="width:85%;" value="${vehicleparemeters.HDZRS !}" type="text"  onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"></td>
						<td style="text-align: right;" class="name">功率/W</td>
						<td><input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" name="vehicleparemeters.GL" id="GL" style="width:85%;" value="${vehicleparemeters.GL !}" type="text"   onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')"></td>
						<td style="text-align: right;" class="name">是否加装遮雨棚</td>
						<td>
							<select id="SFJZYP" style="width:90%;border-color: black;" name="vehicleparemeters.SFJZYP">
								<option value="否">否</option>
								<option value="是">是</opztion>
							</select>
						</td>
						<td style="text-align: right;" class="name">是否加装载物箱</td>
						<td>
							<select id="SFJZZWX" style="width:90%;border-color: black;" name="vehicleparemeters.SFJZZWX">
								<option value="否">否</option>
								<option value="是">是</opztion>
							</select>
						</td>
					</tr>
					
					<tr>
						<td colspan="8">
							<div style="margin-left:5px;font-weight: bold;font-size:18px;">车辆号牌信息</div>
						</td>
					</tr>
					
					<tr>
						<td style="text-align: right;" class="name">号牌号码</td>
						
						
						<td>晋B<input onkeyup="this.value=this.value.replace(/^ +| +$/g,'')" id="carnumber" onblur="isCarnumberNO()" class="required" name="plate.HPHM" style="width:75%;" value=""><strong class='high'>*</strong><div id="carnumRegex" style="color: red;" ></div></td>
					</tr>
					
					<tr>
						<td colspan="8">
							<div style="margin-left:5px;font-weight: bold;font-size:18px;">业务照片信息</div>
						</td>
					</tr>
					<tr>
						<td width="10%" style="text-align: right;" class="name">照片上传</td>
						<td colspan="7" style="font-size:12px;">
							<input name="picStr1" id="picStr1" type="hidden"/>
							<input name="picStr2" id="picStr2" type="hidden"/>
							<input name="picStr3" id="picStr3" type="hidden"/>
							<input name="picStr4" id="picStr4" type="hidden"/>
						</td>
					</tr>
					<tr align="center">
						<td colspan="2" style="padding-top:10px;" width="15%" align="center">
							<img id="xmTanImg1" width="240px" height="240px" /></br>
							<span>来历凭证</span></br></br>
							<input type="button" name="" id="" onclick="paizhao('1');" value="拍照" />
							<input type="button" name="" id="" onclick="yulan('1');" value="预览" />
							<input type="button" name="" id="" onclick="" value="删除" />
						</td>
						<td colspan="2" style="padding-top:10px;" width="15%" align="center">
							<img id="xmTanImg2" width="240px" height="240px" /></br>
							<span>合格证</span></br></br>
							<input type="button" name="" id="" onclick="paizhao('2');" value="拍照" />
							<input type="button" name="" id="" onclick="yulan('2');" value="预览" />
							<input type="button" name="" id="" onclick="" value="删除" />
						</td>
						<td colspan="2" style="padding-top:10px;" width="15%" align="center">
							<img id="xmTanImg3" width="240px" height="240px" /></br>
							<span>车辆</span></br></br>
							<input type="button" name="" id="" onclick="paizhao('3');" value="拍照" />
							<input type="button" name="" id="" onclick="yulan('3');" value="预览" />
							<input type="button" name="" id="" onclick="" value="删除" />
						</td>
						<td colspan="2" style="padding-top:10px;" width="15%" align="center">
							<img id="xmTanImg4" width="240px" height="240px" /></br>
							<span>其他</span></br></br>
							<input type="button" name="" id="" onclick="paizhao('4');" value="拍照" />
							<input type="button" name="" id="" onclick="yulan('4');" value="预览" />
							<input type="button" name="" id="" onclick="" value="删除" />
						</td>
					</tr>
				</table>
					
				</div>	
				<br/>
				<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="margin-left: 45%;margin-bottom:3px;" onclick="saveInfo()">注册</a>
				<br/>
				<div>
					<span style="color: red;"><b>注意：</b></span>
					<br />
					<span>1.驾驶电动车自行车、电动二轮车、电动轮椅车的应当年满16周岁；</span>
					<br />
					<span>2.驾驶电动三轮车的，应当年满18周岁，并取得机动车驾驶证D；</span>
					<br />
					<span>3.驾驶小型低速电动汽车的，应当年满18周岁，并取得C3以上机动车驾驶证；</span>
					<br />
					<span>4.拼装和擅自改装的电动车，不予办理登记；</span>
				</div>
			</div>
			</form>
			</div>
			
	</body>
</html>

<script type="text/javascript">

$(document).ready(function () {	
	$("#OWNERTYPE").combobox({
		onChange: function () {
			var sfzmhm = $("#OWNERTYPE").val();
			if(sfzmhm!=null && sfzmhm!=''){
				if(sfzmhm == "个人"){
					$("#td_dqsfxx2").show();
					$("#td_dqsfxx").show();
					$("#td_sfzmhm").text("身份证号码");
				}else if(sfzmhm == "企业"){
					$("#td_dqsfxx2").hide();
					$("#td_dqsfxx").hide();
					$("#td_sfzmhm").text("社会信用代码");
				}
			}
			
		}
	});	
});
/* 验证手机号 */
function checkPhone(){
   var phone = document.getElementById('uid').value;
   if(!(/^1[34578]\d{9}$/.test(phone))){
     return document.getElementById('uidt').innerHTML = '请输入正确的手机号';
     return false;
   }else{
	   return document.getElementById('uidt').innerHTML = '';
   }
 }

/* 验证座机号 */
 function checkTel(){
   var tel = document.getElementById('tel').value;
   if(!/^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/.test(tel)){
     return document.getElementById('telt').innerHTML = '请输入正确的座机号';
     return false;
   }else{
	   return document.getElementById('telt').innerHTML = '';
   }
 } 
 /* 验证身份证号 */
 function isCardNo(card) {
    var pattern = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
    return pattern.test(card);
}
 function userID(inputid, spanid) {
	    $(inputid).blur(function() {
	        if ($.trim($(inputid).val()).length == 0) {
	            $(spanid).html("请输入正确的身份证明号");
	        } else {
	            if (isCardNo($.trim($(inputid).val())) == false) {
	                $(spanid).html("请输入正确的身份证明号");
	            }
	        }
	    });
	    $(inputid).focus(function() {
	        $(spanid).html("");
	    });
	};
	userID('#SFZHM', "#checkExistID");
	/* 验证车牌号 */
	function isCarnumberNO() {
				var card = document.getElementById('carnumber').value;
				if(!(/^[\[A-HJ-NP-Z0-9]{5}$/.test(card))) {
					return document.getElementById('carnumRegex').innerHTML = '请输入正确的车牌号';
					return false;
				} else {
					return document.getElementById('carnumRegex').innerHTML = '';
				}
			}
	//表单提交
	var submitForm = function($dialog, $grid, $tree, $pjq) {
		saveInfo($dialog, $grid, $tree, $pjq);
	}
	
	function saveInfo($dialog, $grid, $tree, $pjq){
		$('#info_form').form('submit', {
			url: "${cxt !}/zcdjywsl/saveInfo",
			data:$('#info_form').serialize(),// 你的formid
		    dataType: "json",
		    onSubmit: function(){
		    	// do some check
	    		// return false to prevent submit
		    	var flag = check();
		    	return flag;
		    },
		    success:function(result){
		    	if(JSON.parse(result).code == "200"){
		    		$.slideMsg(JSON.parse(result).msg, parent.$);
		    		location.reload();
		    	}else if(JSON.parse(result).code == "300"){
		    		$.slideMsg(JSON.parse(result).msg, parent.$);
		    	}
		    }
		});
	}
</script>
